package ccnu.agile.config.banner;

import ccnu.agile.utils.LogUtils;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

/**
 * @Description: 启动成功标识
 * @AUTHOR Jream.Y
 * @CREATE 2021-06-01
 */
@Component
@ConditionalOnProperty(prefix = "custom", name = "springboot-start-banner", havingValue = "dragon")
class DragonBannerConsole implements CommandLineRunner {

    @Override
    public void run(String... strings) {

        LogUtils.info(this, "\n/***\n" +
                " *\n" +
                " *\n" +
                " *                                                    __----~~~~~~~~~~~------___\n" +
                " *                                   .  .   ~~//====......          __--~ ~~\n" +
                " *                   -.            \\_|//     |||\\\\  ~~~~~~::::... /~\n" +
                " *                ___-==_       _-~o~  \\/    |||  \\\\            _/~~-\n" +
                " *        __---~~~.==~||\\=_    -_--~/_-~|-   |\\\\   \\\\        _/~\n" +
                " *    _-~~     .=~    |  \\\\-_    '-~7  /-   /  ||    \\      /\n" +
                " *  .~       .~       |   \\\\ -_    /  /-   /   ||      \\   /\n" +
                " * /  ____  /         |     \\\\ ~-_/  /|- _/   .||       \\ /\n" +
                " * |~~    ~~|--~~~~--_ \\     ~==-/   | \\~--===~~        .\\\n" +
                " *          '         ~-|      /|    |-~\\~~       __--~~\n" +
                " *                      |-~~-_/ |    |   ~\\_   _-~            /\\\n" +
                " *                           /  \\     \\__   \\/~                \\__\n" +
                " *                       _--~ _/ | .-~~____--~-/                  ~~==.\n" +
                " *                      ((->/~   '.|||' -_|    ~~-/ ,              . _||\n" +
                " *                                 -_     ~\\      ~~---l__i__i__i--~~_/\n" +
                " *                                 _-~-__   ~)  \\--______________--~~\n" +
                " *                               //.-~~~-~_--~- |-------~~~~~~~~\n" +
                " *                                      //.-~~~--\\\n" +
                " *                               神兽保佑\n" +
                " *                              代码无BUG!\n" +
                " */");
    }
}
